import request from "@/utils/request-gis";

// ---------------------------------------------------管点-------------------------------------------------
class GisPointInfoAPI {
  // 新增
  static api_add(data: any) {
    return request({
      url: "/api/GisLineInfo/AddAsync",
      method: "post",
      data,
    });
  }

  // 删除
  static api_del(data: any) {
    return request({
      url: "/api/GisLineInfo/DeleteAsync",
      method: "post",
      data,
    });
  }

  // 批量删除
  static api_del_batch(data: any) {
    return request({
      url: "/api/GisLineInfo/BatchDeleteGisLineInfoAsync",
      method: "post",
      data,
    });
  }

  // 更新
  static api_update(data: any) {
    return request({
      url: "/api/GisLineInfo/UpdateAsync",
      method: "post",
      data,
    });
  }

  // 查询
  static api_query(data: any) {
    return request({
      url: "/api/GisLineInfo/QueryAsync",
      method: "post",
      data,
    });
  }

  // 查询 管点
  static api_query_point(data: any) {
    return request({
      url: "/api/GisLineInfo/QueryGisPointGroupInfoAsync",
      method: "post",
      data,
    });
  }

  // 查询 管线
  static api_query_line(data: any) {
    return request({
      url: "/api/GisLineInfo/QueryGisLineGroupInfoAsync",
      method: "post",
      data,
    });
  }

  // 详情
  static api_detail(id: number) {
    return request({
      url: "/api/GisLineInfo/DetailsAsync?Id=" + id,
      method: "post",
    });
  }

  // 查询 管线
  static api_query_jsongeom(data: any) {
    return request({
      url: "/api/GisLineInfo/QueryJsonGeomAsync",
      method: "post",
      data,
    });
  }

  // 导出
  static api_export_query_async(data: any) {
    return request({
      url: "/api/GisLineInfo/ExportByClassIdQueryAsync",
      method: "post",
      data,
      responseType: "blob",
    });
  }

  // 导出
  static api_export_query_async_(data: any) {
    return request({
      url: "/api/GisLineInfo/ExportQueryAsync",
      method: "post",
      data,
      responseType: "blob",
    });
  }

  // 导入
  static api_import(formData: any) {
    return request({
      url: "/api/GisLineInfo/BatchImportLines",
      method: "post",
      data: formData,
      headers: {
        "Content-Type": "multipart/form-data",
      },
    });
  }
}
export default GisPointInfoAPI;
